<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center" style="">
        <div class="webmap">
            <p class="webmaptip">当前位置:</p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">系统管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">角色管理</a>
        </div>
        <div class="querybycon">
            <form id="query">
                <div class="queryinfo">
                    <div>角色名称<input type="text" name="name"></div>
                </div>
            </form>
        </div>
        <div class="querybtn">
            <a id="querybtn" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'fa fa-search'">查询</a>
            <a id="add" href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'">添加</a>
            <a id="edit" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'fa fa-pencil'">编辑</a>
            <a id="authority" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'icon-key '">权限分配</a>
            <div style="visibility: hidden;">aa</div>
        </div>

        <!-- <div class="separator"></div>-->

    </div>
    <div data-options="region:'center'">
        <table id="list"></table>
    </div>
</div>

<script type="text/javascript">
    var addUrl = "page/role/roleadd.html";
    var editUrl = "page/role/roleedit.html";
    var delUrl = '/role/del';
    var save = '/role/save';
    var listUrl = "/role/list";
    var edit = "/role/edit";
    var columns = [[{
        field: 'id',
        checkbox: true
    }, {
        field: 'name',
        title: '角色名称',
    }, {
        field: 'description',
        title: '角色描述',
    }]];
    list.init({url: listUrl, columns: columns});
    $("#authority").click(function () {
        var rows = $('#list').datagrid('getChecked');
        if (rows.length != 1) {
            $.messager.alert('删除提示', '请选择一行数据', 'info');
            $('#list').datagrid('uncheckAll');
            return false;
        }
        $("#win").window('open').window("refresh", "page/role/authority.html");
    })
</script>
